<?php
include '../connect/common_start.php';
if(isset($_REQUEST['mem_id']))
{
	$mem_id=$_REQUEST['mem_id'];
	//$sql="SELECT p.*,((SELECT SUM(l.`like`) as total FROM `like` l WHERE l.id_mem='$mem_id' AND l.id_post=p.id)) as islike
	//FROM post p WHERE (p.type='2' AND p.date='$NewDate' AND p.status='1')";
	$sql="SELECT p.*,((SELECT SUM(l.`like`) as total FROM `like` l WHERE l.id_mem='$mem_id' AND l.id_post=p.id)) as islike
		FROM post p,member m WHERE (p.id_store='$mem_id' AND p.`status`=1 AND p.id_store=m.id AND m.mem_area='$country') ORDER BY p.create_day DESC";
	$result=mysql_query($sql);
	$rows = array();
	while($r = mysql_fetch_assoc($result)) {
		$rows[] = $r;
	}
	echo json_encode($rows);
}
include '../connect/common_end.php';
?>
